﻿#include "callback.h"
#include "my_qsort.h"
#include "prime.h"
#include "point_arry.h"
#include "struct.h"

static void Swap1(int x, int y)    //值传递 函数中不能改变实参的值，等不到期待的结果
{
    int z = 0;
    z = x;  
    x = y;  
    y = z;
}

static void Swap2(int* x, int* y)  //地址传递
{
    int z = 0;
    z = *x;
    *x = *y;
    *y = z;
}

static void print(unsigned int num)
{
    if (num > 9)
    {
        print(num / 10);
    }
    cout << "num = " << num <<" ";
    printf("%u \r\n", num % 10);
}


int main()
{
    int a = 32;
    int b = 64;

 //   arry_test();
    structsize_count();
   /* point_arry_test();

    point_test();*/
    


    //cout << "变量a的地址：" <<(void*) &a << endl;
    //cout << "交换之前：a = " << a << " b = " << b << endl;
    //Swap2(&a, &b);
    //cout << "交换之后：a = " << a << " b = " << b << endl;
    //cout << endl;

   /* my_qsort_test();*/
   /* point_fun_test();
    
    printf_prime_test();*/

    printf("%d\r\n", printf("%d", printf("%d", 43)));//4321
    //printf 返回值是：打印的字符的个数
    //printf("%d", 43);  这个函数，会打印43，返回值是2

    cout << "递归调用代码演示" << endl;
    print(4096);    //print()这个函数的作用就是按照顺序打印每一位

}
